import { http } from '@/utils/http/axios';

export function listOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/list',
    method: 'post',
    data,
  });
}

export function pageOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/page',
    method: 'post',
    data,
  });
}

export function addOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/add',
    method: 'post',
    data,
  });
}

export function updateOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/update',
    method: 'post',
    data,
  });
}

export function delOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/delete',
    method: 'post',
    data,
  });
}

export function getOrderByMachineCode(data = {}) {
  return http.request({
    url: '/admin/production/order/byMachineCode',
    method: 'post',
    data,
  });
}

export function updateAdjuestOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/updateAdjuest',
    method: 'post',
    data,
  });
}

export function updateMachineOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/updateMachine',
    method: 'post',
    data,
  });
}

export function updateProOrder(data = {}) {
  return http.request({
    url: '/admin/production/order/updatePro',
    method: 'post',
    data,
  });
}

export function cloumsOrder() {
  return http.request({
    url: '/admin/production/order/cloums',
    method: 'get',
  });
}

export function getStatisticsByShiftTime(data) {
  return http.request({
    url: '/admin/production/order/statisticsByShiftTime',
    method: 'post',
    data,
  });
}

export function exportOrder(data) {
  return http.request({
    url: '/admin/production/order/export',
    method: 'post',
    data,
    responseType: 'blob',
  });
}

export function onDutyProductionProgress() {
  return http.request({
    url: '/admin/production/order/onDutyProductionProgress',
    method: 'get'
  });
}
